#ifndef BASICC_INCLUDE_UI_UI_TASK_LIST_H_
#define BASICC_INCLUDE_UI_UI_TASK_LIST_H_

#include "model/task_info.h"
#include <gtk/gtk.h>
#include <stdint.h>

typedef struct TaskListContext {
  GtkWindow *window;
  GtkTreeSelection *task_selection;
  GtkListStore *task_store;
  GSList *download_task_list; //是个单链表
  int downloading_task_size; //正在下载的任务的数量； 关闭任务时需要把这些任务都停下来（即downloading_task_size减为0）,把状态都保存好了,才能把窗口关闭
} TaskListContext;

void InitTaskList(GtkBuilder *builder);

void DestroyTaskList();

void AddTaskToList(TaskInfo *task_info);

void RemoveSelectedTask();

void ResumeSelectedTask();

void PauseSelectedTask();
#endif //BASICC_INCLUDE_UI_UI_TASK_LIST_H_
